//
//  WelcomeViewController.swift
//  WBSwift
//
//  Created by 贺瑞 on 2017/8/4.
//  Copyright © 2017年 herui. All rights reserved.
//

import UIKit
import SDWebImage

class WelcomeViewController: UIViewController {

    //头像
    @IBOutlet weak var iconIV: UIImageView!
    //
    @IBOutlet weak var consB_iconIV: NSLayoutConstraint!
    
    
    override func viewDidLoad() {
        super.viewDidLoad()

        let url = URL(string: UserInfo.userInfo()?.avatar_large ?? "")
        iconIV.sd_setImage(with: url, placeholderImage: #imageLiteral(resourceName: "avatar_default"))
        
        
        consB_iconIV.constant = UIScreen.main.bounds.size.height - 200
        UIView.animate(withDuration: 3, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: [], animations: {
            self.view.layoutIfNeeded()
        }) { (_) in
            AppDelegate.rootVCSwitch2SB()
        }
    }
}
